package com.itheima.IO流.day01.字节流FileInputStream;

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;

public class Demo7x {
    public static void main(String[] args) throws IOException {
        FileInputStream fis = null;
        FileOutputStream fos = null;
        try {
            //创建数据流
            fis = new FileInputStream("D:\\黑马视频\\EV录屏\\a.mp4");
            fos = new FileOutputStream("day10的IO流01\\a.mp4");
            byte[] bys = new byte[4096];
            int len;
            while ((len = fis.read(bys)) != -1) {
                //System.out.print(new String(bys, 0, len));
                fos.write(bys,0,len);
            }
        } catch (IOException e) {
            fis.close();
            fos.close();
            e.printStackTrace();
        }

    }
}
